<div class="user-nav">
	<div class="user-net-name">
		饰图网
	</div>
	<div class="login user-area-nav" ng-show="isLogin">
		<div ng-show="normalUser">
			<img class="user-icon" ng-src="{{user.logo? imgRoot + 'usericons/' + user.id + '.jpg' : imgRoot + '/usericons/user.jpg'}}" />
			<span>{{user.name}}</span>
		</div>
		<div ng-show="!normalUser">
			<img class="user-icon" ng-src="{{qqUser.figureurl}}" />
			<span>{{qqUser.nickname}}</span>
		</div>
		<ul class="user-options ng-hide">
			<li ui-sref="home">首页</li>
			<li ng-click="logOut()">退出</li>
		</ul>
	</div>
</div>

<div class="user-banner shadow-1">
	<div class="padding shadow-1"></div>
	<div class="avatar">
		<div ng-show="normalUser">
			<img ng-src="{{user.logo? imgRoot + 'usericons/' + user.id + '.jpg' : imgRoot + 'usericons/user.jpg'}}" />
		</div>
		<div ng-show="!normalUser">
			<img ng-src="{{qqUser.figureurl_2}}" />
		</div>
		<div class="comment">
			<div>
				<span>0</span>
				<span>粉丝</span>
			</div>
			<div>
				<span>0</span>
				<span>关注</span>
			</div>
		</div>
		<!--<button ng-click="refresh()">refresh</button>-->
	</div>
	<div class="username" ng-model="user">
		<span ng-show="normalUser">{{user.name}}</span>
		<span ng-show="!normalUser">{{qqUser.nickname}}</span>
	</div>
	<div class="user-banner-nav">
		<div>图集</div>
		<div>收藏</div>
	</div>
</div>
<div class="img-area container-fluid">
	<div class="row">
		<div class="tuku">
			<a class="nav-text" ng-click="backToUserCollection()">我的图库</a><span style="font-size: 15px" ng-show="!userCollectionShow">&nbsp;>&nbsp;</span>
			<a class="nav-text" ng-show="!userCollectionShow">{{userCollectionName}}</a>
			<button class="btn rbtn" ng-show="!userCollectionShow" ng-click="backToCollection()" style="float: right;">返回上一级</button>
			<button class="btn rbtn" ng-show="userCollectionShow" ui-sref="home" style="float: right;">返回首页</button>
		</div>
		<!-- cover -->
		<div name="collection" class="img-detail" style="background-color: transparent;" ng-show="userCollectionShow">
			<div class="collection-area">
				<div class="img-pad shadow-1 add" ng-click="addCollection()">
					<div class="add-img">
						<i class="iconfont">&#xea35;</i>
						<span>
							添加图集
						</span>
					</div>
				</div>
				<div class="img-pad shadow-1" ng-repeat="pad in userSets" ng-click="getImgFromCollection(pad.cname, '', $index)">
					<button class="btn rbtn deleteCollection" ng-click="delCollection($event, pad.cname, $index)" style="position: absolute;z-index: 1500; right: 0px;">X</button>
					<div class="imgsm">
						<img ng-src="{{pad.cover.cname? rootMin + pad.cover.cname + '/' + pad.cover.img_name + '.jpg' : imgRoot + pad.cover.img_name + '.jpg'}}" />
					</div>			
					<div class="text-area">
						<div class="left">{{pad.cname}}</div>
					</div>
				</div>
			</div>
			<pagination data="{{curSets}}" view="userSets"></pagination>
		</div>
		
		<!-- image -->
		<div name="image" class="img-detail" ng-show="!userCollectionShow">
			<div class="pads-area">
				<div class="img-pad" ng-repeat="img in userImgsPartition" ng-click="viewImg(img)">
					<div class="img-pad-nav">
						<div style="float: left;">
							<button class="rbtn btn sm" ng-click="collectionImg($event, img)" style="padding: 0px!important;">收藏</button>
						</div>
						<div style="float: right;">
							<!--<i class="iconfont md unlike" ng-click="like($event, img)">&#xe6ca;</i>-->
							<button class="btn rbtndeleteCollection" ng-click="delectImg($event, img)" style="z-index: 1500;">X</button>
						</div>
					</div>
					<div class="imgsm">
						<img ng-src="{{rootMin + img.cname + '/' + img.img_name + '.jpg'}}" />
					</div>
					<div class="text-area">
						<div class="left">{{img.img_name}}</div>
					</div>
				</div>
			</div>
			<pagination data="{{userImgs}}" view="userImgsPartition"></pagination>
		</div>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="new-collection" tabindex="-1" role="dialog" aria-labelledby="newCollection" data-backdrop="static" keyboard="false">
	<div class="modal-dialog" role="document" style="width: 400px!important;">
		<div class="modal-content">
			<div class="modal-header login-header">
				<span class="modal-title" id="myModalLabel">新建图集</span>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			</div>
			<div class="modal-body">
				<input class="form-control" placeholder="图集名称" type="text" ng-model="newCollectionName" />
				<br />
				<select class="form-control" ng-options="t as t for t in types" ng-model="type"></select>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<button type="button" class="btn rtbn" ng-click="createNewCollection()">创建</button>
			</div>
		</div>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="img-view" tabindex="-1" role="dialog" aria-labelledby="img-view">
	<div class="modal-dialog" role="document" style="width: 100%!important;">
		<div class="modal-content" style="background-color: transparent !important;border: none!important;">
			<button class="modal-exit-btn" type="button" class="close close-btn" ng-click="exit('img-view')"><span aria-hidden="true">&times;</span></button>
			<div class="imgview-frame">
				<div class="left-frame">
					<div class="piece">
						<div class="tool-bar">
							<button class="rbtn btn" ng-click="collectBind(curImg.img_name, 1)">收藏</button>
							<button class="btn" ng-click="unbind(curImg)">删除</button>
						</div>
						<div class="img">
							<img id="userimg-open" ng-src="{{root + curImg.cname + '/' + curImg.img_name + '.jpg'}}" />
						</div>
					</div>
					<div class="piece">
						<div class="img-info">{{"图名：" + curImg.img_name + '.jpg'}}</div>
					</div>
				</div>
				<div class="right-frame">
					<div class="piece">
						<div class="board-info">
							<a class="user-icon">
								<img ng-src="{{rootMin + curSets[curSetIndex].cover.cname + '/' + curSets[curSetIndex].cover.img_name + '.jpg'}}" /><span>{{" 图集：" + curUserCname}}</span>
							</a>
						</div>
						<div class="tinyImgsZone">
							<div class="tinyimg" ng-repeat="i in userImgs" ng-click="toggleImg(i)" >
								<img ng-src="{{rootMin + i.cname + '/' + i.img_name + '.jpg'}}"/>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="collect-view" tabindex="-1" role="dialog" aria-labelledby="collect-view">
	<div class="modal-dialog" role="document" style="width: 600px!important;margin: 0 auto;padding-top: 5%!important;">
		<div class="modal-content" style="height: 500px;background-color: #FFFFFF !important;border: none!important;">
			<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="position: absolute;z-index: 2000;right: 20px;top: 10px;"><span aria-hidden="true">&times;</span></button>
			<div class="box-title">收藏</div>
			<div class="box-inner">
				<div class="preview">
					<div class="preimg">
						<img ng-src="{{rootMin + curImg.cname + '/' + curImg.img_name + '.jpg'}}" />
					</div>
				</div>
				<div class="right-part">
					<div class="board-list">
						<div class="searchSet">
							<input class="form-control" placeholder="搜索图集或创建图集"/ ng-model="set">
							<ul class="sets">
								<li class="ss" id="{{'s' + $index}}" ng-repeat="s in curSets | filter: set" ng-click="selectSet($index)">{{s.cname}}</li>
							</ul>
						</div>
					</div>
					<div class="add-collection" ng-show="set">
						<span ng-click="createCollection(set)" style="color: #8c8c8c;"><i class="iconfont">&#xe64e;</i>新建图集</span><span class="collection-name">{{" '" + set + "'"}}</span>
					</div>
					<button class="btn rbtn" ng-click="collectBind(curImg.img_name + '.jpg')">收藏</button>
				</div>
			</div>
		</div>
	</div>
</div>